package jxtend.processor.eclipse.visitor.traverser;

import jxtend.processor.eclipse.visitor.handler.ASTNodeHandler;

import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;

@SuppressWarnings("restriction")
/**
 * Interface for offering an alternative traverse of the (sub)elements of a ASTNode.
 * <p>
 * For example a class implementing {@link ASTNodeVisitorHandler} can also implement this interface to for example
 * change the order of how its elements are visited (i.e. for visiting the 'initialization' expression of a
 * {@code LocalDeclaration} before its type).
 * </p>
 *
 * @author Emil van Galen
 */
public interface ASTNodeChildrenTraverser extends ASTNodeHandler {
	boolean isApplicable(ASTNode node);

	void traverseChildren(ASTNode node, ASTVisitor visitor, BlockScope scope);
}
